package logic;

public class Move {

	private int sourceRow;
	private int sourceColumn;
	private int targetRow;
	private int targetColumn;

	private Piece capturedPiece;

	public Move(int sourceRow, int sourceColumn, int targetRow, int targetColumn) {
		this.sourceRow = sourceRow;
		this.sourceColumn = sourceColumn;
		this.targetRow = targetRow;
		this.targetColumn = targetColumn;
	}

	public String toString() {
		return Piece.getColumnString(sourceColumn) + "/"
				+ Piece.getRowString(sourceRow) + " -> "
				+ Piece.getColumnString(targetColumn) + "/"
				+ Piece.getRowString(targetRow);
	}

	public int getSourceRow() {
		return sourceRow;
	}

	public void setSourceRow(int sourceRow) {
		this.sourceRow = sourceRow;
	}

	public int getSourceColumn() {
		return sourceColumn;
	}

	public void setSourceColumn(int sourceColumn) {
		this.sourceColumn = sourceColumn;
	}

	public int getTargetRow() {
		return targetRow;
	}

	public void setTargetRow(int targetRow) {
		this.targetRow = targetRow;
	}

	public int getTargetColumn() {
		return targetColumn;
	}

	public void setTargetColumn(int targetColumn) {
		this.targetColumn = targetColumn;
	}

	public Piece getCapturedPiece() {
		return capturedPiece;
	}

	public void setCapturedPiece(Piece capturedPiece) {
		this.capturedPiece = capturedPiece;
	}

	public Move clone() {
		return new Move(sourceRow, sourceColumn, targetRow, targetColumn);
	}

}
